package Dynamic_programming;


import org.junit.Test;

import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;



/**
 * @Description: 页面转word$
 * @Param: $
 * @return: $
 * @Author 万家欣
 * @Date: 2022/6/1
 * Algorithm
 * @Version 1.0
 */
public class HtmlToWord {
 /*   public void setTrs(){
        Document wordDoc = null;
        try {
            wordDoc = new Document();
            DocumentBuilder builder = new DocumentBuilder(wordDoc);
            String html = "";
            builder.insertHtml(html);
            wordDoc.save("D:\\test.doc", createSaveOptions(SaveFormat.DOCX));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }*/
    @Test
    public void s(){
        String time ="2020-05";
        String name = time.split("-")[0]+"年"+time.split("-")[1]+"月浙江省大气PM化学组成特征及来源.docx";
        String x = null;
        try {
            x = new String(name.getBytes("GBK"),"UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        System.out.println(x);
        System.out.println(name);
    }
    public boolean isMonotonic(int[] nums) {
        boolean x =true;
        for (int i = 0; i < nums.length - 1 ; i++) {
            x &= nums[i] - nums[i +1] < 0;
        }
        return x;
    }
}
